﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Taxes.EXIF
{
    public struct ExifRational
    {
        public ExifRational(int numerator, int denominator)
        {
            _numerator = numerator;
            _denominator = denominator;
        }

        private int _numerator;
        public int Numerator
        {
            get { return _numerator; }
            set { _numerator = value; }
        }

        private int _denominator;
        public int Denominator
        {
            get { return _denominator; }
            set { _denominator = value; }
        }

        public decimal ToDecimal()
        {
            return ((decimal)_numerator) / ((decimal)_denominator);
        }

        public override string ToString()
        {
            return _numerator + "/" + _denominator;
        }
    }
}
